package cn.iocoder.yudao.module.vlog.report.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.vlog.report.service.VLogReportService;
import cn.iocoder.yudao.module.vlog.report.vo.VLogReportPageReqVO;
import cn.iocoder.yudao.module.vlog.report.vo.VLogReportRespVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "管理后台 - 视频举报")
@RestController
@RequestMapping("/vlog/report")
@Validated
public class VLogReportController {

    @Resource
    private VLogReportService reportService;

    @GetMapping("/page")
    @Operation(summary = "获得举报分页")
    @PreAuthorize("@ss.hasPermission('vlog:report:query')")
    public CommonResult<PageResult<VLogReportRespVO>> getReportPage(@Valid VLogReportPageReqVO pageReqVO) {
        PageResult<VLogReportRespVO> pageResult = reportService.getReportPage(null, pageReqVO);
        return success(pageResult);
    }

}
